package jwr;

import java.awt.Container;
import java.awt.FlowLayout;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

import javax.swing.ImageIcon;
import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.JLabel;

public class JLabelDemo extends JFrame implements ActionListener{
	JLabel result = new JLabel("");
	public JLabelDemo() {
		ImageIcon ii = new ImageIcon("C:/Users/pc20/Desktop/jpg2.jpg");
		JButton korea = new JButton("클릭하세요.",ii);
		Container ct = getContentPane();
		ct.setLayout(new FlowLayout());
		ct.add(korea);
		ct.add(result);
		korea.addActionListener(this);
	}

	@Override
	public void actionPerformed(ActionEvent e) {
		result.setText("세계에서 가장 좋은 한국 입니다.");
	}
}
